The Complexity of Pattern Matching for a Random String
نویسنده
چکیده
We study the average-case complexity of finding all occurrences of a given pattern CX in an input text string. Over an alphabet of q symbols, let c&n) be the minimum average number of characters that need to be exa-mined in a-random text string of length n . We prove that, for large m , almost all patterns a of length m satisfy c&n) = Q(rlogq(E+2)1) if msnl2m, and c@,n) = 8 n m if n>2m. This in particular confirms a conjecture raised in a recent paper by Knuth, Morris, and Pratt [&I.
منابع مشابه
Constant-Time Randomized Parallel String Matching
Given a pattern string of length m for the string matching problem, we design an algorithm that computes deterministic samples of a suuciently long substring of the pattern in constant time. This problem used to be the bottleneck in the pattern preprocessing for one-and two-dimensional pattern matching. The best previous time bound was O(log 2 m= log log m). We use this algorithm to obtain the ...
متن کاملOptimal Packed String Matching
In the packed string matching problem, each machine word accommodates α characters, thus an n-character text occupies n/α memory words. We extend the Crochemore-Perrin constantspace O(n)-time string matching algorithm to run in optimal O(n/α) time and even in real-time, achieving a factor α speedup over traditional algorithms that examine each character individually. Our solution can be efficie...
متن کاملA Unified View to String Matching Algorithms
We present a uniied view to sequential algorithms for many pattern matching problems, using a nite automaton built from the pattern which uses the text as input. We show the limitations of deterministic nite automata (DFA) and the advantages of using a bitwise simulation of non-deterministic nite automata (NFA). This approach gives very fast practical algorithms which have good complexity for s...
متن کاملView to String Matching Algorithms ? Ricardo
We present a uniied view to sequential algorithms for many pattern matching problems, using a nite automaton built from the pattern which uses the text as input. We show the limitations of deter-ministic nite automata (DFA) and the advantages of using a bitwise simulation of non-deterministic nite automata (NFA). This approach gives very fast practical algorithms which have good complexity for ...
متن کاملOptimally fast parallel algorithms for preprocessing and pattern matching in one and two dimensions
All algorithms below are optimal alphabet-independent parallel CRCW PRAM algorithms. In one dimension: Given a pattern string of length m for the string-matching problem, we design an algorithm that computes a deterministic sample of a suu-ciently long substring in constant time. This problem used to be a bottleneck in the pattern preprocessing for one-and two-dimensional pattern matching. The ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- SIAM J. Comput.
دوره 8 شماره
صفحات -
تاریخ انتشار 1979